
create database Students
on
(
	name='Students',
	filename='C:\sql2014\Students.mdf',
	size=5MB,
	maxsize=50MB,
	filegrowth=10MB
)
log on
(
	name='Students_log',
	filename='C:\sql2014\Students_log.ldf',
	size=5MB,
	maxsize=50MB,
	filegrowth=10MB
)
go
use Students
go
create table Stulnfo
(
	StuID int primary key identity(1,1),
	StuNum char(10) not null,
	StuName nvarchar(20) not null,
	StuSex char(2) not null,
	StuPhone nvarchar(11)
)
create table Classlnfo
(
	ClassID int primary key identity(1,1),
	ClassNum char(15) not null,
	ClassName nvarchar(30) not null,
	ClassRemark varchar(MAX) not null,
	StuID int
)